package com.xhui.controller.dto;
// com.xhui.controller.dto data transfer object 数据传输对象

import lombok.Data;

/**
 * ajax请求的封装结果对象
 * @author XHui
 * @date 2022/12/26 08:32:07
 * Version: 1.0.0
 * Description:
 */
@Data
public class AjaxResult<T> {


    private Boolean flag; // 操作是否成功

    private Integer code; // 操作结果的代码标识

    private String msg; // 操作返回的提示信息

    private T data; // 操作所需返回的数据

    public AjaxResult() {

    }

    public AjaxResult(Boolean flag) {
        this.flag = flag;
    }

    public AjaxResult(Boolean flag, T data) {
        this.flag = flag;
        this.data = data;
    }

    public AjaxResult(Boolean flag, String msg) {
        this.flag = flag;
        this.msg = msg;
    }

    public AjaxResult(Boolean flag, Integer code, String msg, T data) {
        this.flag = flag;
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    // 封装一些常用的数据返回对象


}
